<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <?php include "inc/head.php"; ?>
    <?php if ($GLOBALS['cms']['gray']) {
    echo '<link href="/' . $GLOBALS['t_path'] . 'css/gray.min.css" rel="stylesheet">';
  } ?>
</head>

<body>
    <?php include "inc/header.php"; ?>
    <?php include "inc/nav.php"; ?>
    <?php include "inc/banner.php"; ?>

    <!-- showcase -->
    <div class="container bg-white block-split block-shadow">
        <dl class="title">
            <?php
      $cid = 4;
      $channel = get_channel($cid);
      ?>
            <dt><?php echo $channel['c_name']; ?></dt>
        </dl>
        <div class="row list-mix">
            <?php
      $list = list_detail($channel['c_sub'] ?: $cid, '0,6');
      foreach ($list as $val) {
        echo '<div class="col-sm-6 col-md-4 card">
          <a href="' . d_url($val['id']) . '">
          <div class="thumbnail">
            <img src="' . img_always($val['d_picture']) . '" alt="' . $val['d_name'] . '">
            <div class="caption">
              <h3>' . $val['d_name'] . '</h3>
              <p>' . str_cut($val['d_content'], 100) . '</p>
            </div>
          </div>
          </a>
        </div>';
      }
      ?>
        </div>
    </div>

    <!-- news -->
    <div class="container bg-white block-split block-shadow">
        <dl class="title">
            <?php
      $cid = 2;
      $channel = get_channel($cid);
      ?>
            <dt><?php echo $channel['c_name']; ?></dt>
        </dl>
        <div class="list-group">
            <?php
      $list = list_detail($channel['c_sub'] ?: $cid, '0,5');
      foreach ($list as $val) {
        echo '<a href="' . d_url($val['id']) . '" class="list-group-item">[' . date('Y-m-d', $val['d_date']) . '] ' . $val['d_name'] . '</a>';
      }
      ?>
        </div>
    </div>



    <?php include "inc/footer.php"; ?>
    <?php include "inc/js.php"; ?>

    <?php include "inc/code.php"; ?>
</body>

</html>